package com.fancy.mobileschool.service;

import com.fancy.mobileschool.entity.Course;
import java.util.List;


/**
 * Created by Jackie on 2017/11/21.
 *
 */

public class CourseService {

    private static final String baseUrl = URLConfig.baseUrl +  "course";


    public List<Course> getMyGroupsForStudent(String myID) {
        List<Course> rs;
        String url = baseUrl + "/getMyGroupsForStu.do?myID=" + myID;
        rs = OKHttpBase.fromJsonListByGet(url, Course.class);
        return rs;
    }

    public List<Course> getMyGroupsForTeacher(String myID) {
        List<Course> rs;
        String url = baseUrl + "/getMyCourseForTea.do?myID=" + myID;
        rs = OKHttpBase.fromJsonListByGet(url, Course.class);
        return rs;
    }
}
